]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
2 years agoutil: Adapt to ClutterCapture removal
Bilal Elmoussaoui [Thu, 4 Jan 2024 08:18:41 +0000 (09:18 +0100)]
util: Adapt to ClutterCapture removal

It is not used anywhere by Mutter itself so move it here

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3088>

2 years agoscreenshot: Expand window contents
Florian Müllner [Thu, 28 Dec 2023 09:34:33 +0000 (10:34 +0100)]
screenshot: Expand window contents

More fallout from commit c290a38730eb2 …

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7287

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3083>

2 years agoextensions-tool/list: Allow filtering by (in)active state
Florian Müllner [Thu, 21 Dec 2023 22:16:18 +0000 (23:16 +0100)]
extensions-tool/list: Allow filtering by (in)active state

This brings back the filtering that the `--enable`/`--disable`
flags used to do, which can be useful as well.

For instance

  $ gnome-extensions list --active

to show all extensions currently in use, or

  $ gnome-extensions list --enabled --inactive

for extensions that are inactive despite being enabled.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensions-tool/list: Use new `enabled` property for filtering
Florian Müllner [Thu, 21 Dec 2023 20:06:20 +0000 (21:06 +0100)]
extensions-tool/list: Use new `enabled` property for filtering

The new property is a better match for the `--enabled`/`--disabled`
flags, not least because both are used for completions to the
`enable` and `disable` commands.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensions-tool: Include enabled info in details
Florian Müllner [Thu, 21 Dec 2023 22:23:36 +0000 (23:23 +0100)]
extensions-tool: Include enabled info in details

Both an extension's ACTIVE state and whether it is enabled can
be interesting, so include both when displaying extension details.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensions-tool: Rename ENABLED/DISABLED states
Florian Müllner [Thu, 21 Dec 2023 20:03:41 +0000 (21:03 +0100)]
extensions-tool: Rename ENABLED/DISABLED states

Follow the update terminology used by the extension system, in
particular when displaying extension details to the user.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensions-app: Add compat code for older shell versions
Florian Müllner [Tue, 19 Dec 2023 23:17:29 +0000 (00:17 +0100)]
extensions-app: Add compat code for older shell versions

The Extensions app is also distributed as flatpak, so we cannot
assume that its version matches the shell. In order to not show
all extensions as disabled when running under a shell version that
doesn't include the `enabled` property yet, add a fallback based
on the current state.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensions-app: Use new 'enabled' property
Florian Müllner [Tue, 12 Sep 2023 12:25:03 +0000 (14:25 +0200)]
extensions-app: Use new 'enabled' property

The switch for enabling/disabling extensions currently bases its
state on the extension's ACTIVE state.

This is problematic in the enabled-but-inactive case, because
activating the switch tries to change the state from off to on,
which leads to enabling an already enabled extension (an obvious
no-op).

The new `enabled` property allows us to do better, and use delayed
state changes where the switch position represents the `enabled`
state, and the trough color whether the extension is ACTIVE.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensionSystem: Allow changing extensions in ERROR state
Florian Müllner [Tue, 19 Dec 2023 23:02:35 +0000 (00:02 +0100)]
extensionSystem: Allow changing extensions in ERROR state

While an extension's actual state can no longer change once it is
in ERROR state, its requested state can. In fact, disabling an
erroneous extension is highly recommended, so that it doesn't cause
problems again on the next login.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensionSystem: Add 'enabled' property
Florian Müllner [Tue, 12 Sep 2023 12:11:55 +0000 (14:11 +0200)]
extensionSystem: Add 'enabled' property

Unlike `state` which represents the actual state, the new property
reflects the desired state, i.e. whether an extension should be
enabled according to the settings.

The Extension app will soon use it to improve its handling of the
case where the two mismatch (e.g. extension errors).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agoextensionSytem: Rename ENABLED/DISABLED states
Florian Müllner [Thu, 21 Dec 2023 17:59:33 +0000 (18:59 +0100)]
extensionSytem: Rename ENABLED/DISABLED states

The ENABLED state means that an extension's `enable()` method
was called successfully.

This usually matches whether an extension *should* be enabled
according to the enabled-extensions/disabled-extensions settings,
but not necessarily: If an extension had an error or does not
support the currently active mode, its actual state is different.

We currently only expose the actual state to external tooling,
but whether an extension should be enabled is relevant as well,
for example to disable a lock-screen only extension from the
regular session.

For that purpose we will expose a separate `enabled` property.
To avoid confusion with the existing states, change the exposed
names to (IN)ACTIVE.

This does not affect the D-Bus API, as the numeric values of
the states remain unchanged.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>

2 years agodata: Update symbolic assets for pagination buttons
Sam Hewitt [Tue, 2 Jan 2024 18:49:33 +0000 (15:19 -0330)]
data: Update symbolic assets for pagination buttons

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3085>

2 years agoappMenu: Move setApp to null before destroy
Jonian Guveli [Sun, 31 Dec 2023 18:30:11 +0000 (20:30 +0200)]
appMenu: Move setApp to null before destroy

Calling `setApp` after the menu has been destroyed results in error.
Moving the method before `super.destroy()` fixes the issue.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2998>

2 years agoanimation: Use appropriate spinner asset in light variant
Florian Müllner [Wed, 21 Jun 2023 15:47:13 +0000 (17:47 +0200)]
animation: Use appropriate spinner asset in light variant

Ideally we would replace the sliced-image based animation with a
themed `process-working-symbolic` icon and rotate it, so the spinner
simply picks up the current foreground color.

Unfortunately the `repeat-count` property does not work for rotations,
so to fix the broken spinner in the light variant
in the meantime, include assets for both variants and swap them
out at runtime.

Not everything in the light variant is actually light (overview,
OSDs, ...), so use a simple heuristic on the text color to decide
which asset to use.

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6783

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3080>

2 years agoanimation: Save file and dimensions in properties
Florian Müllner [Sun, 24 Dec 2023 10:11:14 +0000 (11:11 +0100)]
animation: Save file and dimensions in properties

The properties passed to the constructor are currently used
directly in anonymous functions. Store them in properties
instead, so they become accessible outside the constructor,
including for changing them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3080>

2 years agowindowManager: Add shortcuts to open new window of nth pinned app
Leleat [Tue, 4 May 2021 10:58:00 +0000 (12:58 +0200)]
windowManager: Add shortcuts to open new window of nth pinned app

Add new shortcuts to open a new instance of an app by pressing
Super + Ctrl + Number. This is analogous to ctrl-activating
(LMB/Enter) an app icon.

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4129

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1829>

2 years agodata: Update descriptions of switch-to-app-n shortcuts
Florian Müllner [Sat, 23 Dec 2023 22:03:49 +0000 (23:03 +0100)]
data: Update descriptions of switch-to-app-n shortcuts

The user-visibility terminology switched from "favorite" to
"pin"/"unpin" a while ago, so update the description accordingly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1829>

2 years agoextensions-app: Restore developer_name
Sabri Ünal [Sat, 23 Dec 2023 21:39:32 +0000 (00:39 +0300)]
extensions-app: Restore developer_name

The newly added developer name syntax appears not implemented
across related platforms: GNOME Software, Flathub, etc.

There is no harm in using both deprecated and newly introduced
tags together, and neither appstream-glib nor appstreamcli
fails to validate this usage.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3079>

2 years agoextension-app: Improve appdata for AppStream 1.0
Sabri Ünal [Thu, 21 Dec 2023 15:58:16 +0000 (18:58 +0300)]
extension-app: Improve appdata for AppStream 1.0

- Use the `<developer><name>` tag instead of the deprecated `<developer_name>`
- Implement appstreamcli for extra appdata validation
- Fix a release description
- Update the donation URL
- Add the translation tag

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3071>

2 years agomain: Override global logError() function
Florian Müllner [Thu, 21 Dec 2023 17:43:17 +0000 (18:43 +0100)]
main: Override global logError() function

logError() prints an exception with an optional prefix, and is
used fairly commonly through-out the code base.

The problem is that by being defined in gjs, it uses "Gjs" as the
GLib log domain, not our own as expected.

Address this by adding a small override that implements the function
with console.error().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3072>

2 years agoscreenshot: Add and implement new D-Bus method
Georges Basile Stavracas Neto [Sat, 28 Oct 2023 22:21:05 +0000 (19:21 -0300)]
screenshot: Add and implement new D-Bus method

The new InteractiveScreenshot() D-Bus method is implemented using
the signals introduced by the previous commit, and is fundamentally
very simple: take the screenshot, and return the GFile URI.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>

2 years agoscreenshot: Add signals to ScreenshotUI
Georges Basile Stavracas Neto [Sat, 28 Oct 2023 22:18:53 +0000 (19:18 -0300)]
screenshot: Add signals to ScreenshotUI

These signals will let the yet to be introduced D-Bus method to
be notified of when either a screenshot has been taken, or if
the screenshot UI has been closed without taking a screenshot.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>

2 years agoscreenshot: Add SCREENSHOT_ONLY UI mode
Georges Basile Stavracas Neto [Fri, 15 Dec 2023 20:23:51 +0000 (17:23 -0300)]
screenshot: Add SCREENSHOT_ONLY UI mode

Add a screenshot-exclusive mode that makes the screencast button
unreactive, and therefore disables screencasting. It doesn't change
the visibility of the button though, as that's done by the codepath
that checks if screencasting is supported.

This will be used by the D-Bus callback to take interactive
screenshots.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>

2 years agoscreenshot: Make captureScreenshot() return the GFile
Georges Basile Stavracas Neto [Sat, 28 Oct 2023 22:14:39 +0000 (19:14 -0300)]
screenshot: Make captureScreenshot() return the GFile

Make the captureScreenshot() auxiliary function return the GFile at
which the texture was saved. This file will be used to return the
screenshot URI to the new D-Bus method to take interactive
screenshots.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>

2 years agoextensions-app: Update metainfo
Florian Müllner [Wed, 20 Dec 2023 14:01:19 +0000 (15:01 +0100)]
extensions-app: Update metainfo

After the last rounds of redesign, it's time to update
the appdata accordingly:

- update screenshots
- add screenshot captions
- point homepage to apps.gnome.org
- mark as mobile adaptive

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Overhaul search
Florian Müllner [Wed, 20 Dec 2023 13:32:31 +0000 (14:32 +0100)]
extensions-app: Overhaul search

Instead of awkwardly filtering two different lists, use a separate
search page that filters a single list, similar to what libadwaita
does for preference windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Use ListModel to track extensions
Florian Müllner [Tue, 19 Dec 2023 17:57:37 +0000 (18:57 +0100)]
extensions-app: Use ListModel to track extensions

Manually adding and removing rows to dynamic lists is rather
old-fashioned, GTK 4 strongly encourages the use of models.

Modernize the code by exposing extensions as ListModel, and
bind it to the two lists with appropriate filters.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Use property bindings in row
Florian Müllner [Tue, 19 Dec 2023 17:57:37 +0000 (18:57 +0100)]
extensions-app: Use property bindings in row

Now that extensions are represented as GObjects, we can update
the UI via property bindings instead of manually handling the
logic in the code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Bind actions' enabled properties
Florian Müllner [Tue, 19 Dec 2023 01:35:33 +0000 (02:35 +0100)]
extensions-app: Bind actions' enabled properties

Most properties that determine the availability of an action are
not expected to change, but now that extensions are represented
as a GObject, we can just generically set up bindings for all
actions instead of explicitly tracking the properties that we
expect to change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Turn Extension into a GObject
Florian Müllner [Tue, 19 Dec 2023 17:45:04 +0000 (18:45 +0100)]
extensions-app: Turn Extension into a GObject

This makes the Extension class usable as item-type in models,
and allows us to use property bindings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Split out ExtensionManager
Florian Müllner [Mon, 18 Dec 2023 19:20:26 +0000 (20:20 +0100)]
extensions-app: Split out ExtensionManager

The extension handling is currently intertwined with the UI.

Splitting it out provides a clearer separation, and will allow
us to switch to a model-based UI later.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Move classes to their own files
Florian Müllner [Tue, 19 Dec 2023 14:14:19 +0000 (15:14 +0100)]
extensions-app: Move classes to their own files

Using a single source file is getting unwieldy, so start
splitting it up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Stop simulating Shell.global
Florian Müllner [Tue, 19 Dec 2023 00:48:01 +0000 (01:48 +0100)]
extensions-app: Stop simulating Shell.global

ExtensionUtils no longer relies on the global object, so we don't
have to simulate it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agoextensions-app: Use console for logging
Florian Müllner [Tue, 19 Dec 2023 12:11:11 +0000 (13:11 +0100)]
extensions-app: Use console for logging

This allows us to use different log levels, and an appropriate
log domain.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

2 years agopanel: Ensure signal is disconnected when the panel is destroyed
Julian Sparber [Tue, 19 Dec 2023 10:48:54 +0000 (11:48 +0100)]
panel: Ensure signal is disconnected when the panel is destroyed

This fixes a warning when terminating GNOME Shell

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3064>

2 years agoextensionSystem: Add debug logging
Florian Müllner [Fri, 15 Dec 2023 17:05:43 +0000 (18:05 +0100)]
extensionSystem: Add debug logging

Now that we can use console.debug() to log messages that aren't
shown by default, we can be a lot more verbose without spamming
the system log.

Use that to all extension state changes, which can be useful for
debugging.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3058>

2 years agoextensions-app: Stop setting description tooltip
Florian Müllner [Tue, 19 Dec 2023 00:54:10 +0000 (01:54 +0100)]
extensions-app: Stop setting description tooltip

We no longer ellipsize the description label, so the tooltip
no longer has a purpose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Use details popover
Florian Müllner [Sun, 10 Dec 2023 22:21:38 +0000 (23:21 +0100)]
extensions-app: Use details popover

Showing all the extension info and possible actions in every
row is fairly noisy, and doesn't match the usual list patterns.

Streamline the UI by moving the actions and most of the info into
a details popover, so the rows themselves get closer to the
standard pattern.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7119

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextension-app: Remove tooltips from row suffixes
Florian Müllner [Mon, 11 Dec 2023 16:52:25 +0000 (17:52 +0100)]
extension-app: Remove tooltips from row suffixes

The updates/error icons are now interactive, and have more information
in the corresponding popover than could be covered
by a tooltip.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Use less concise error strings
Florian Müllner [Mon, 11 Dec 2023 00:41:46 +0000 (01:41 +0100)]
extensions-app: Use less concise error strings

Now that the error information is displayed in a separate popover,
we can afford to be more verbose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Make error/update icon interactive
Florian Müllner [Sun, 10 Dec 2023 22:59:04 +0000 (23:59 +0100)]
extensions-app: Make error/update icon interactive

Both icons are not immediately obvious, and the context provided
by the tooltip can be hard to discover.

Address this by making the icons interactive, and provide further
information in a popover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Set labelled-by relation for lists
Florian Müllner [Tue, 12 Dec 2023 16:03:14 +0000 (17:03 +0100)]
extensions-app: Set labelled-by relation for lists

We use our own lists so we can do filtering, but that means we
lose the built-in relation with the group's title.

Set the relation ourselves, so the two lists are described correctly
in screen readers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Update group headers
Florian Müllner [Sun, 10 Dec 2023 23:42:50 +0000 (00:42 +0100)]
extensions-app: Update group headers

Change titles to the clearer "User/System Extensions" and drop the
description.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Make kill switch more compact
Florian Müllner [Sun, 10 Dec 2023 23:34:31 +0000 (00:34 +0100)]
extensions-app: Make kill switch more compact

Instead of using a subtitle, move the stability warning into an
information popover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextension-app: Use mnemonics in confirmation dialog
Florian Müllner [Thu, 14 Dec 2023 18:14:33 +0000 (19:14 +0100)]
extension-app: Use mnemonics in confirmation dialog

Mnemonics (aka "access keys") should be used whenever possible:

https://developer.gnome.org/hig/guidelines/keyboard.html#access-keys

They are currently missing from the confirmation dialog, add them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Add shortcuts window
Florian Müllner [Tue, 12 Dec 2023 20:13:56 +0000 (21:13 +0100)]
extensions-app: Add shortcuts window

There aren't many shortcuts and all of them are standard, but
documenting them is still good practice, and our main menu is
a tad bit less empty.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agoextensions-app: Remove Help menu item
Florian Müllner [Mon, 11 Dec 2023 01:08:36 +0000 (02:08 +0100)]
extensions-app: Remove Help menu item

The app has been around for quite a while now, but there still
isn't any user documentation. Time to remove a menu item that
doesn't do anything.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

2 years agopanelMenu: Remove SystemIndicator class
Florian Müllner [Wed, 20 Dec 2023 12:59:12 +0000 (13:59 +0100)]
panelMenu: Remove SystemIndicator class

It was used by components in the aggregate menu. That menu no
longer exists, and the class has been superseded by the class of
the same name in quick settings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3068>

2 years agostyle: Fix missing light theme color definitions
Sam Hewitt [Mon, 18 Dec 2023 13:51:03 +0000 (10:21 -0330)]
style: Fix missing light theme color definitions

- Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7267

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3062>

2 years agoshell: Drop X11-specific code to handle stage focus
Carlos Garnacho [Tue, 12 Sep 2023 18:51:24 +0000 (20:51 +0200)]
shell: Drop X11-specific code to handle stage focus

This code is being adopted by Mutter, so remove this handling
from ShellGlobal.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2950>

2 years agouserWidget: Expand child
Florian Müllner [Sat, 16 Dec 2023 22:57:48 +0000 (23:57 +0100)]
userWidget: Expand child

More fallout from commit c290a38730eb2 …

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7264

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3061>

2 years agoextensionSystem: Sort extensions before loading
Sundeep Mediratta [Wed, 11 Oct 2023 10:31:19 +0000 (06:31 -0400)]
extensionSystem: Sort extensions before loading

When an extension is disabled, we "rebase" all extensions that
were enabled afterwards, in case they override the same method.

This can be fairly expensive, in particular when disabling many
extensions at once, for instance when locking the screen.

Help with that by sorting extensions by the number of session-modes,
as extensions that support multiple modes are less likely to be
disabled on session mode changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2851>

2 years agolookingGlass: Set expand of DebugFlags children
Florian Müllner [Fri, 15 Dec 2023 19:54:00 +0000 (20:54 +0100)]
lookingGlass: Set expand of DebugFlags children

Since commit c290a38730eb2a, St.Bin respects the child's
expand properties instead of basing expansion on the
alignment.

Commit b02800f8 updated a number of callers to prepare for the
change, but the "Flags" tab in looking glass was missed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3060>

2 years agost/bin: Delegate child allocation to layout manager
Florian Müllner [Wed, 6 Dec 2023 14:45:17 +0000 (15:45 +0100)]
st/bin: Delegate child allocation to layout manager

Since commit ed3b8d093e16, the actor's single-child policy is
enforced even when using the generic add/remove_child() methods.

This makes it possible to follow GTK/AdwBin's lead and replace
out custom child allocation with a BinLayout, without changing
the actor's semantics in a fundamental way.

However this does change slightly how the child is allocated, as
it now only expands according to its expand properties, not when
the alignment is set to FILL.

Even after the preparations in the previous commit, some fallout
is still likely, but it will be easy to address, and the cleanup
is significant enough to justify it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>

2 years agojs: Explicitly set expand of St.Bin children
Florian Müllner [Wed, 6 Dec 2023 14:46:12 +0000 (15:46 +0100)]
js: Explicitly set expand of St.Bin children

Right now, St.Bin ignores the child's expand properties, and
instead expands the child if its alignment is set to FILL.

This will change when we replace the custom allocation code
with a layout manager, so to prepare for that, set the expand
property where needed to keep the expected behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>

2 years agost/box-layout: Set layout manager type
Florian Müllner [Wed, 6 Dec 2023 14:20:56 +0000 (15:20 +0100)]
st/box-layout: Set layout manager type

Now that ClutterActor itself provides API to use a particular
layout manager type, we can use that instead of our own mechanism.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>

2 years agost/texture-cache: Drop bind_surface_property() method
Florian Müllner [Thu, 14 Dec 2023 20:46:12 +0000 (21:46 +0100)]
st/texture-cache: Drop bind_surface_property() method

It was only used for the fallback icon of X11 windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3056>

2 years agoshell/app: Remove X11-specific icon fallback
Florian Müllner [Thu, 14 Dec 2023 20:30:00 +0000 (21:30 +0100)]
shell/app: Remove X11-specific icon fallback

We have considered .desktop files a required app component for
more than 10 years now. It also has been several years that the
default session switched to wayland, which doesn't have protocol
for window icons.

So stop using an elaborate fallback path just for legacy clients,
and just fall back to the same generic icon we use for wayland
clients.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3056>

2 years agoscreenshot: Allow any enter key activate capture
Scott Buchanan [Fri, 26 May 2023 15:20:58 +0000 (16:20 +0100)]
screenshot: Allow any enter key activate capture

We currently only consider enter/return on the main keyboard
area, but not on the numpad.

Fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6128

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2777>

2 years agostyle: Rewrote app grid tile drawing functions
Sam Hewitt [Tue, 14 Nov 2023 14:00:45 +0000 (10:30 -0330)]
style: Rewrote app grid tile drawing functions

- updated mixin for tile_button
- dropped the overview_button mixin
- minor changes to dash, appDisplay and switcherPopup JS to accommodate new stylesheet
- new focus style for all tile buttons
- improved high contrast style support for app grid and dash
- renamed some style-classes
- tidied up dash stylesheet

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3017>

2 years agoPass 'radius' to blur APIs instead of 'sigma'
Daniel van Vugt [Thu, 1 Jul 2021 08:03:57 +0000 (16:03 +0800)]
Pass 'radius' to blur APIs instead of 'sigma'

Requires mutter!1908 first.

So now consumers of the clutter blur code don't have to know the
implementation is Gaussian and no longer need to convert the intended
blur radius to a sigma value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1905>

2 years agodocs: Fix st reference in urlmap
Florian Müllner [Thu, 14 Dec 2023 17:11:14 +0000 (18:11 +0100)]
docs: Fix st reference in urlmap

Whoops, no idea how that happened.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3055>

2 years agoci: Fix publishing docs
Florian Müllner [Thu, 14 Dec 2023 16:49:47 +0000 (17:49 +0100)]
ci: Fix publishing docs

The originally merge request predates the switch to `main` as
the default branch name (by a mere week!).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3054>

2 years agoschema: Better describe always-show-log-out key
Cassidy James Blaede [Fri, 8 Dec 2023 21:37:13 +0000 (21:37 +0000)]
schema: Better describe always-show-log-out key

- The "user menu" was replaced with "system menu" years ago, so
  update the terminology in the summary and description
- Remove the full stop from the end of the summary for consistency
- More verbosely describe the behavior that's being overridden to
  reduce confusion

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3050>

2 years agoci: Build docs in CI
Zander Brown [Mon, 7 Jun 2021 00:10:28 +0000 (01:10 +0100)]
ci: Build docs in CI

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>

2 years agodoc: Switch documentation to gi-docgen
Zander Brown [Mon, 7 Jun 2021 00:04:55 +0000 (01:04 +0100)]
doc: Switch documentation to gi-docgen

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>

2 years agodbusService: Exempt org.gnome.Shell from sender tracking
Florian Müllner [Wed, 13 Dec 2023 00:11:52 +0000 (01:11 +0100)]
dbusService: Exempt org.gnome.Shell from sender tracking

If an interface has any signals, we don't want to auto-shutdown
while a caller is still connected to a signal.

Unfortunately we can't tell whether there are any signal connections,
so we track all callers instead, and keep the service alive while
any of them is still on the bus.

For services that we call from gnome-shell itself - like screencasts
or extensions - this has the unintended side effect of effectively
disabling auto-shutdown.

Address this by exempting the org.gnome.Shell name from sender
tracking.

Services that we expect to keep running for the lifetime of the
shell already disable auto-shutdown, so the only downside is a
small startup delay to resolve the well-known shell name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7250

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3052>

2 years agoextensions-window: Add placeholder text to the search entry
Automeris naranja [Thu, 21 Sep 2023 19:47:59 +0000 (16:47 -0300)]
extensions-window: Add placeholder text to the search entry

"Text fields should have placeholder text or a label".

https://developer.gnome.org/hig/patterns/controls/text-fields.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>

2 years agoextensions-window: Add tooltips to headerbar buttons
Automeris naranja [Thu, 21 Sep 2023 19:46:06 +0000 (16:46 -0300)]
extensions-window: Add tooltips to headerbar buttons

"Controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>

2 years agoextensions-window: Allow opening Main Menu with F10
Automeris naranja [Thu, 21 Sep 2023 19:43:54 +0000 (16:43 -0300)]
extensions-window: Allow opening Main Menu with F10

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>

2 years agowindowPreview: Don't hide overlay while hovering icon
Florian Müllner [Thu, 9 Nov 2023 23:08:18 +0000 (00:08 +0100)]
windowPreview: Don't hide overlay while hovering icon

We should treat the icon like we do the caption or close button,
and still consider the preview hovered when the pointer is over
the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3049>

2 years agoextensions-app: Use banner instead of action bar
Florian Müllner [Thu, 7 Dec 2023 18:10:40 +0000 (19:10 +0100)]
extensions-app: Use banner instead of action bar

Action bars have largely gone out of fashion, and Banner is an
appropriate replacement in our case, so switch to that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3048>

2 years agost/scroll-view: Allow removing edge fade
Julian Sparber [Thu, 7 Dec 2023 16:37:35 +0000 (17:37 +0100)]
st/scroll-view: Allow removing edge fade

Remove the fade effect when the css property `-st-vfade-offset` is removed
from a widget. The effect isn't added when the property never existed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3047>

2 years agost/widget: Adjust to changes to get_transformed_paint_volume() in mutter
Sebastian Keller [Tue, 5 Dec 2023 21:10:04 +0000 (22:10 +0100)]
st/widget: Adjust to changes to get_transformed_paint_volume() in mutter

This method is now transfer full.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3045>

2 years agost/widget: Don't allow adding/removing "" style class
Sebastian Keller [Fri, 3 Nov 2023 09:07:42 +0000 (10:07 +0100)]
st/widget: Don't allow adding/removing "" style class

strstr() in find_class_name() will always consider "" a match so the
loop was not stopping at the end of the class_list. None of the matches
within the class_list would satisfy the return conditions, unless the
class_list was either an empty string as well or has a trailing space.
So this ends up with a match outside of the allocated string that
happens to satisfy these conditions by chance which then leads to the
class string containing some of this unrelated memory. Or it might lead
to a segfault.

This adds checks to the public API that uses find_class_name() to
prevent extensions from accidentally triggering a crash this way or
having some otherwise unexpected results.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7152
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3006>

2 years agost/bin: Fix height request
Florian Müllner [Tue, 5 Dec 2023 17:10:34 +0000 (18:10 +0100)]
st/bin: Fix height request

The request currently mixes up y-align and x-align.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3043>

2 years agostyle: Improve text scaling support
Sam Hewitt [Wed, 29 Nov 2023 17:48:59 +0000 (14:18 -0330)]
style: Improve text scaling support

- new drawing function to convert px to em, for select instances
- updated fontsize function to convert fonts in pt to em
- replace instances of discrete sizes with defined values
- fix instances where assets or icons did not scale along with text
- rework panel buttons to accommodate the scaling padding and icons
- new 'scalable' definitions for elements that follow text scaling

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3033>

2 years agodoc: Add README for toolbox tooling
Florian Müllner [Sat, 2 Dec 2023 00:30:39 +0000 (01:30 +0100)]
doc: Add README for toolbox tooling

Now that we have a collection of scripts around the toolbox
workflow, it makes sense to add a brief overview over the
available tools.

For now it's just located in the corresponding tools folder,
but it gives us something to point to once we overhaul the
toplevel documentation as part of the wiki migration.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3040>

2 years agotools: Remove outdated jhbuild setup script
Florian Müllner [Sat, 2 Dec 2023 00:42:17 +0000 (01:42 +0100)]
tools: Remove outdated jhbuild setup script

As useful as the custom jhbuild setup was at the time, it has been
superseded by jhbuild proper (which gained the ability to install
system dependencies since) or alternatives like containers.

Given that the script hasn't been meaningfully updated for almost
10 years, its list of dependencies is hopelessly outdated, and it's
therefore more likely to confuse newcomers than being of actual
help.

As much as I have fond memories of the script when starting out,
it's finally time to retire.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3040>

2 years agoextension-tool: Remove old compatibility code
Florian Müllner [Sun, 3 Dec 2023 11:20:47 +0000 (12:20 +0100)]
extension-tool: Remove old compatibility code

Since GNOME 44, extension schemas are compiled at install time.

At the time GNOME 46 is released, this will be all supported versions,
so start relying on it and drop the old compatibility
code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3042>

2 years agopopupMenu: Use less ambiguous symbols for radio options
Sam Hewitt [Thu, 23 Nov 2023 14:46:18 +0000 (11:16 -0330)]
popupMenu: Use less ambiguous symbols for radio options

- new checked and unchecked dot ornament assets
- updated JS with a NO_DOT ornament state, replaced instances of NONE with this

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3027>

2 years agotools/toolbox: Add run convenience script
Florian Müllner [Fri, 1 Sep 2023 02:18:32 +0000 (04:18 +0200)]
tools/toolbox: Add run convenience script

Wrapping the gnome-shell call with `dbus-run-session` is *mostly*
enough for testing, but not quite.

When running without gnome-session, the wayland display is not
propagated to the D-Bus daemon, so any app that is D-Bus activated
still opens in the host session.

This can be worked around by using a specific wayland-display name
and exporting it to the `dbus-run-session` environment up-front.

At this point the invocation is finicky enough to justify another
convenience script. This also gives us a place to expose some
useful features for testing, like forcing a right-to-left layout
or simulating the greeter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agotools/toolbox: Add build convenience script
Florian Müllner [Fri, 1 Sep 2023 01:55:43 +0000 (03:55 +0200)]
tools/toolbox: Add build convenience script

We don't require any build steps other than the standard meson
commands, but entering a toolbox and running 2-3 meson commands
still adds some friction.

Add a small convencience script that
 - finds the toplevel source directory (similar to `jhbuild make`)
 - enters the speficied toolbox (or the configured default)
 - automatically picks a build directory based on the toolbox name
 - builds and installs the project to /usr (inside the toolbox)

It also allows specifying meson -D options to change the build
configuration, and to optionally run `meson dist`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agotools/toolbox: Set up first toolbox as default
Florian Müllner [Fri, 1 Sep 2023 12:33:24 +0000 (14:33 +0200)]
tools/toolbox: Set up first toolbox as default

Setting up more than one gnome-shell toolbox is uncommon, and users
shouldn't have to specify --set-default for other tools to pick the
right default.

It would be possible to detect the number of containers that were
created from the shell toolbox image, but the far easier option is
to just set up the first container as default.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agotools/toolbox: Allow to set new toolbox as default for other tools
Florian Müllner [Fri, 1 Sep 2023 01:40:10 +0000 (03:40 +0200)]
tools/toolbox: Allow to set new toolbox as default for other tools

When specified, write out a small config file that can be sourced
by other scripts to pick the default toolbox container.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agostyle: Don't clip scrolling folder icons until they touch the border
Daniel van Vugt [Mon, 27 Nov 2023 06:49:05 +0000 (14:49 +0800)]
style: Don't clip scrolling folder icons until they touch the border

In the absence of a fade-out it doesn't make sense to clip them sooner
than that.

So now we make the left and right padding equal to the border
("box-shadow") width and leave the top/bottom padding unchanged.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3031>

2 years agoextension-tool: Show "version-name" field if set
Florian Müllner [Thu, 30 Nov 2023 13:18:36 +0000 (14:18 +0100)]
extension-tool: Show "version-name" field if set

Now that both the website and the Extension app support the custom
"version-name" field, we should expose it in the CLI tool as well.

As a more developer-oriented tool, keep showing the automatic
version along-side the new field when both are set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3034>

2 years agoextensions-app: Support "version-name" metadata field
Aryan Kaushik [Fri, 27 Oct 2023 09:28:19 +0000 (14:58 +0530)]
extensions-app: Support "version-name" metadata field

The extensions site recently added support for a custom
"version-name" string in metadata:
gitlab.gnome.org/Infrastructure/extensions-web/-/merge_requests/154

This allows developers to control the version that is exposed to
users. As the version according to the developer is almost always
more relevant than the automatic version assigned by the website,
use it instead of the "version" field if set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2995>

2 years agoUpdate Slovak translation
Dušan Kazik [Mon, 27 Nov 2023 13:43:08 +0000 (13:43 +0000)]
Update Slovak translation

(cherry picked from commit 5808dac61718f45604d3210fa6fb6b1789b37d14)

2 years agopadOsd: Fix rings and strips event handling
Peter Hutterer [Fri, 24 Nov 2023 03:16:12 +0000 (13:16 +1000)]
padOsd: Fix rings and strips event handling

    JS ERROR: TypeError: event.get_pad_event_details is not a function
    vfunc_captured_event@resource:///org/gnome/shell/ui/padOsd.js:824:53
    @resource:///org/gnome/shell/ui/init.js:21:20

These were renamed in mutter@97213041e8e7

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7210

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3029>

2 years agostyle: Fix oversights in screenshot UI css for high contrast
Sam Hewitt [Fri, 24 Nov 2023 14:35:28 +0000 (11:05 -0330)]
style: Fix oversights in screenshot UI css for high contrast

- fix non-working is_highcontrast if statements in drawing
- add missing hc bits for screenshot UI elements

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3030>

2 years agoUse dedicated assets for ctrlAltTab
Sam Hewitt [Wed, 15 Nov 2023 15:02:27 +0000 (11:32 -0330)]
Use dedicated assets for ctrlAltTab

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3019>

2 years agodbusServices/extensions: Only show dialog when loaded
Florian Müllner [Tue, 21 Nov 2023 12:28:30 +0000 (13:28 +0100)]
dbusServices/extensions: Only show dialog when loaded

After the port to ESM, an extension's `prefs.js` file is imported
asynchronously. An unintended side effect of that is that we now
show the dialog before anything can be added to the window (either
by the extension, or the fallback error UI).

The delay almost always won't be noticeable to users, but it's
bad practice and prevents extensions from using some API that
only works before the window is realized.

To address the issue, add a `loaded` signal to the dialog that allows
the caller to postpone showing the window until the UI is ready.

Close: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7201
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3025>

2 years agomain: Instantiate EndSessionDialog
Charles Wong [Sat, 28 Oct 2023 07:34:36 +0000 (15:34 +0800)]
main: Instantiate EndSessionDialog

Using an exported `init()` function to create the object is an odd
pattern, and not having the object referenced anywhere makes it harder
to access for debugging or extensions.

Just export the `EndSessionDialog` class and instantiate it like we
do for other objects.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2997>

2 years agostyle: Stop setting slider height
Florian Müllner [Thu, 26 Oct 2023 16:56:17 +0000 (18:56 +0200)]
style: Stop setting slider height

Now that the slider requests a correct height, it is no longer
necessary to set it explicitly from the stylesheet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agoslider: Request a size
Florian Müllner [Thu, 26 Oct 2023 11:39:38 +0000 (13:39 +0200)]
slider: Request a size

Sliders (and level bars) currently don't request any size, so it's
up to the caller (or stylesheet) to explicitly set a size big
enough to fit the bar/handle.

That's rather unexpected, we should request the size we need ourselves.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7133

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agoslider: Cache custom style properties
Florian Müllner [Thu, 26 Oct 2023 18:09:23 +0000 (20:09 +0200)]
slider: Cache custom style properties

Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agobarLevel: Cache custom style properties
Florian Müllner [Thu, 26 Oct 2023 17:37:36 +0000 (19:37 +0200)]
barLevel: Cache custom style properties

Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agobarLevel: Stop capping border-width at 1 pixel
Florian Müllner [Thu, 26 Oct 2023 13:17:45 +0000 (15:17 +0200)]
barLevel: Stop capping border-width at 1 pixel

I can't think of a reason why limiting the border to a maximum
would make any sense.

The original intention was probably to set a minimum border width
to avoid having to deal with border/no-border complexity in the code,
but as cairo accepts a line width of 0, it just works.

However limiting the size to the overall height seems reasonable,
as at that size a bigger height and different fill color can
achieve the same effect without requires special handling of
other values like the radius.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agostatus/volume: Always look up device objects
Florian Müllner [Wed, 8 Nov 2023 18:41:18 +0000 (19:41 +0100)]
status/volume: Always look up device objects

Gvc may clean its device cache after we set up the device menu,
which can lead to failed assertions when using the "old" object
to later switch the device from a callback.

Make sure this doesn't happen by looking up the ID again from
the callback.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7173
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3011>